/*
 *  Copyright (C) 2011  Clint Priest
 *
 *  This file is part of pklib.
 *
 *  pklib is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  pklib is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with pklib.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// 
//var LogBuffer = [ ];
//	
///* Log() logs info to the Firebug plugin if available, identical usage to console.log() from within a client page */
//function Log() {
//	if(LogBuffer) {
//		LogBuffer.push(arguments);
//		return arguments[0];
//	}
//		
//	if(typeof Firebug != 'undefined') {
//		Firebug.Console.logFormatted(arguments);
//	} else {
//		/* If Firebug not in our current context, try seeing if there is a recent browser window context that has it, if so, use it. */
//		var mrbw = Components.classes["@mozilla.org/appshell/window-mediator;1"]
//					.getService(Components.interfaces.nsIWindowMediator)
//					.getMostRecentWindow("navigator:browser");
//		if(typeof mrbw.Firebug != 'undefined')
//			mrbw.Firebug.Console.logFormatted(arguments);
//	}
//	return arguments[0];
//}
///** Logs a warning to the standard console */
//Log.Warning = function(Message, Source, Line, Column) {
//	var ConsoleService = Components.classes["@mozilla.org/consoleservice;1"]
//							.getService(Components.interfaces.nsIConsoleService);
//	var ScriptMessage = Components.classes["@mozilla.org/scripterror;1"]
//							.createInstance(Components.interfaces.nsIScriptError);
//	ScriptMessage.init(Message, Source, null, Line, Column, 1, null);
//	ConsoleService.logMessage(ScriptMessage);
//};

//setTimeout( function() {
//	var x = LogBuffer;
//	LogBuffer = undefined;
//	x.forEach( function(args) {
//		Log.apply(Log, args);
//	} );
//}, 1000);
